<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="format-detection" content="telephone=no,email=no,adress=no">
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath() %>/js/easyui/themes/metro/easyui.css" type="text/css" rel="stylesheet"/>
<link href="<%=request.getContextPath() %>/js/date/skin/WdatePicker.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/easyui/easyui.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/date/WdatePicker.js"></script>
<script type="text/javascript">

$(function(){

	condition();

	$("#dataTable").datagrid({
		toolbar: '#dataSearch',
		fitColumns:true,
		striped: true, 
		singleSelect:false,
		pagination:true,
		rownumbers:true,
		SelectOnCheck:true,
		CheckOnSelect:true,
        onSelect: function(index,row){
        	var nos="";
        	var rows = $('#dataTable').datagrid('getSelections');
        	for(var i=0; i<rows.length; i++){
        		nos=nos+rows[i].ck+",";
        	}
			$("#keys").val(nos);
    	},
    	onUnselect: function(index,row){
        	var nos="";
        	var rows = $('#dataTable').datagrid('getSelections');
        	for(var i=0; i<rows.length; i++){
        		nos=nos+rows[i].ck+",";
        	}
			$("#keys").val(nos);
    	},
    	onSelectAll: function(rows){
        	var nos="";
        	for(var i=0; i<rows.length; i++){
        		nos=nos+rows[i].ck+",";
        	}
			$("#keys").val(nos);
    	},
    	onUnselectAll: function(rows){
			$("#keys").val("");
    	}
	});
	
	$('#dataTable').datagrid('getPager').pagination({
		total:<s:property value="pageInfo.pageRecord"/>,
		pageNumber:<s:property value="pageInfo.pageIndex"/>,
		pageSize:<s:property value="pageInfo.pageSize"/>,
		pageList: [20,50,100] ,
		onSelectPage:function(pageNumber,pageSize){  
			toPage(pageNumber,pageSize);
		},
		onRefresh:function(pageNumber,pageSize){  
			location.reload();
		}
	});
	
});

function condition(){
	if($("#high").prop("checked")){
		$(".ac").show();
	}else{
		$(".ac").hide();
	}
}

</script>
</head>
<body >
<div id="dataSearch" >    
<form id="sform" action="card_list.html" method="get" enctype="multipart/form-data">
<table style="width: 100%;">
<tr>
<td height="25" >
	<b>操作说明:多个编号可以用逗号隔开</b> 
</td>
</tr>
<tr><td height="30" >
<s:textfield  id="crdNo" name="crdNo" placeholder="编号"></s:textfield>
<s:select id="crdType" name="crdType" list="@dicts.CardDict@CARD_LIST" headerKey="" headerValue="卡类型"/>
<s:textfield  id="crdNumber" name="crdNumber" placeholder="卡号" cssStyle="width:240px;"></s:textfield>
<s:textfield  id="crdDateTop"  name="crdDateTop" placeholder="日期起"  onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="crdDateTop" format="yyyy-MM-dd"/></s:param></s:textfield>
 - 
<s:textfield  id="crdDateEnd"  name="crdDateEnd" placeholder="日期止"  onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="crdDateEnd" format="yyyy-MM-dd"/></s:param></s:textfield>

<input type="button" class="submit" value="提交查询" onclick="sform.submit();"/>
<input type="button" class="submit" value="高级搜索" onclick="$('#high').click();"/>
<s:checkbox id="high" name="high"  onclick="condition();" cssStyle="display:none;"></s:checkbox>
</td>
</tr>
<tr><td><hr/></td></tr>
<tr class="ac"  style="display: none;"><td height="30" >
<s:textfield  id="crdIp" name="crdIp" placeholder="ip地址"></s:textfield>
<s:textfield  id="crdOs" name="crdOs" placeholder="操作系统"></s:textfield>
<s:textfield  id="crdBrowser" name="crdBrowser" placeholder="浏览器"></s:textfield>
<s:textfield  id="crdFinger" name="crdFinger" placeholder="指纹"></s:textfield>
<s:textfield  id="crdLocale" name="crdLocale" placeholder="语言"></s:textfield>
<s:textfield  id="crdTiming" name="crdTiming" placeholder="时区"></s:textfield>
<s:textfield  id="crdCode" name="crdCode" placeholder="ip国家码"></s:textfield>
<s:textfield  id="crdBin" name="crdBin" placeholder="bin国家码"></s:textfield>
</td>
</tr>
<tr class="ac"  style="display: none;"><td height="30" >
<s:textfield  id="crdCfname" name="crdCfname" placeholder="收货人姓" cssStyle="width:100px;" ></s:textfield>-<s:textfield  id="crdClname" name="crdClname" placeholder="收货人名" cssStyle="width:100px;" ></s:textfield>
<s:textfield  id="crdCphone" name="crdCphone" placeholder="电话" cssStyle="width:160px;" ></s:textfield>
<s:textfield  id="crdCemail" name="crdCemail" placeholder="邮箱" cssStyle="width:240px;"></s:textfield>
<s:textfield  id="crdCcountry" name="crdCcountry" placeholder="国家" cssStyle="width:100px;" ></s:textfield>
<s:textfield  id="crdCstate" name="crdCstate" placeholder="州/省" cssStyle="width:100px;" ></s:textfield>
<s:textfield  id="crdCcity" name="crdCcity" placeholder="城市" cssStyle="width:100px;" ></s:textfield>
<s:textfield  id="crdCaddr" name="crdCaddr" placeholder="地址" cssStyle="width:240px;"></s:textfield>
<s:textfield  id="crdCzip" name="crdCzip" placeholder="邮编" cssStyle="width:100px;" ></s:textfield>
</td>
</tr>
<tr class="ac"  style="display: none;"><td height="30" >
<s:textfield  id="crdHfname" name="crdHfname" placeholder="持卡人姓" cssStyle="width:100px;" ></s:textfield>-<s:textfield  id="crdHlname" name="crdHlname" placeholder="持卡人名" cssStyle="width:100px;" ></s:textfield>
<s:textfield  id="crdHphone" name="crdHphone" placeholder="电话" cssStyle="width:160px;" ></s:textfield>
<s:textfield  id="crdHemail" name="crdHemail" placeholder="邮箱" cssStyle="width:240px;"></s:textfield>
<s:textfield  id="crdHcountry" name="crdHcountry" placeholder="国家" cssStyle="width:100px;" ></s:textfield>
<s:textfield  id="crdHstate" name="crdHstate" placeholder="州/省" cssStyle="width:100px;" ></s:textfield>
<s:textfield  id="crdHcity" name="crdHcity" placeholder="城市" cssStyle="width:100px;" ></s:textfield>
<s:textfield  id="crdHaddr" name="crdHaddr" placeholder="地址" cssStyle="width:240px;"></s:textfield>
<s:textfield  id="crdHzip" name="crdHzip" placeholder="邮编" cssStyle="width:100px;" ></s:textfield>
</td>
</tr>
<tr class="ac" style="display: none;"><td><hr/></td></tr>
<tr>
<td height="30" >
	<input type="hidden"  id="keys" name="keys"  value=""/>
		<input type="button" class="submit"   value="导出数据"  onclick="if(confirm('确认要执行导出操作吗?')){window.open(location.href.replace('list','export'));}"/>
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="button" class="submit" value="编号排序" onclick="toSort('sortField','crdNo')"/>
		<input type="button" class="submit" value="类型排序" onclick="toSort('sortField','crdType')"/>
		<input type="button" class="submit" value="卡号排序" onclick="toSort('sortField','crdNumber')"/>
		<input type="button" class="submit" value="日期排序" onclick="toSort('sortField','crdDate')"/>
		
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="button" class="submit" value="升序排列" onclick="toSort('sortOrder','true')"/>
		<input type="button" class="submit" value="降序排列" onclick="toSort('sortOrder','false')"/>
</td>
</tr>
</table>
</form>
</div>

<table id="dataTable" style="width: 100%;" class="easyui-datagrid" >
<thead>
<tr>
<th data-options="field:'ck'" checkbox="true"></th>
<th data-options="field:'crdNo', width:'10%',align:'left' , halign: 'left'">编号</th>
<th data-options="field:'crdType', width:'5%',align:'left' , halign: 'left'">类型</th>
<th data-options="field:'crdNumber', width:'12%',align:'left' , halign: 'left'">卡号</th>
<th data-options="field:'crdIp', width:'10%',align:'left' , halign: 'left'">IP地址</th>
<th data-options="field:'crdCode', width:'5%',align:'left' , halign: 'left'">IP码</th>
<th data-options="field:'crdBin', width:'5%',align:'left' , halign: 'left'">BIN码</th>
<th data-options="field:'crdCfname', width:'10%',align:'left' , halign: 'left'">收货人名</th>
<th data-options="field:'crdCphone', width:'10%',align:'left' , halign: 'left'">收货人电话</th>
<th data-options="field:'crdCemail', width:'12%',align:'left' , halign: 'left'">收货人邮箱</th>
<th data-options="field:'crdDate', width:'10%',align:'left' , halign: 'left'">日期</th>
<th data-options="field:'op', width:'100',align:'left' , halign: 'left'">操作</th>

</tr>
</thead>
<tbody>
<s:iterator value="cardList" id="show" status="seq">
<tr>
<td><s:property value="#show.crdNo"/></td>
<td><s:property value="#show.crdNo"/></td>
<td><s:property value="#show.crdType"/></td>
<td><s:property value="#show.crdNumber"/></td>
<td><s:property value="#show.crdIp"/></td>
<td><s:property value="#show.crdCode"/></td>
<td><s:property value="#show.crdBin"/></td>
<td><s:property value="#show.crdCfname"/> <s:property value="#show.crdClname"/></td>
<td><s:property value="#show.crdCphone"/></td>
<td><s:property value="#show.crdCemail"/></td>
<td><s:text name="global.format.dateminute"><s:param value="#show.crdDate"/></s:text>
<td>
<input type="button" value="查看" style="width: 50px;" class="submit" onclick="location.href='<%=request.getContextPath()%>/card_show.html?crdNo=<s:property value="#show.crdNo"/>'"/>
</td>

</tr>
</s:iterator>
</tbody>
</table>
<br/>
<br/>
<br/>
</body>
</html>
